package com.difsonapps.android.joinme.socket;


import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class Client extends AsyncTask<Object, Object, Object> {

	private Socket socket;

	private static final int SERVERPORT = 8000;
	private static final String SERVER_IP = "10.0.2.2";
	
	@Override
	protected Object doInBackground(Object... params) {

		new Thread(new ClientThread()).start();

		return null;
	}

//
//	PrintWriter out = new PrintWriter(new BufferedWriter(
//					new OutputStreamWriter(socket.getOutputStream())),
//					true);


	class ClientThread implements Runnable {

		@Override
		public void run() {

			try {
				InetAddress serverAddr = InetAddress.getByName(SERVER_IP);

				socket = new Socket(serverAddr, SERVERPORT);

			} catch (UnknownHostException e1) {
				e1.printStackTrace();
			} catch (IOException e1) {
				e1.printStackTrace();
			}

		}

	}


}